3.2.98 \(\int \tan ^5(e+f x) (a+b \tan ^2(e+f x))^2 \, dx\) [198]

Optimal. Leaf size=105 \[ -\frac {(a-b)^2 \log (\cos (e+f x))}{f}-\frac {(a-b)^2 \tan ^2(e+f x)}{2 f}+\frac {(a-b)^2 \tan ^4(e+f x)}{4 f}+\frac {(2 a-b) b \tan ^6(e+f x)}{6 f}+\frac {b^2 \tan ^8(e+f x)}{8 f} \]

[Out]

-(a-b)^2*ln(cos(f*x+e))/f-1/2*(a-b)^2*tan(f*x+e)^2/f+1/4*(a-b)^2*tan(f*x+e)^4/f+1/6*(2*a-b)*b*tan(f*x+e)^6/f+1
/8*b^2*tan(f*x+e)^8/f

________________________________________________________________________________________

Rubi [A]
time = 0.08, antiderivative size = 105, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {3751, 457, 90} \begin {gather*} \frac {b (2 a-b) \tan ^6(e+f x)}{6 f}+\frac {(a-b)^2 \tan ^4(e+f x)}{4 f}-\frac {(a-b)^2 \tan ^2(e+f x)}{2 f}-\frac {(a-b)^2 \log (\cos (e+f x))}{f}+\frac {b^2 \tan ^8(e+f x)}{8 f} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Tan[e + f*x]^5*(a + b*Tan[e + f*x]^2)^2,x]

[Out]

-(((a - b)^2*Log[Cos[e + f*x]])/f) - ((a - b)^2*Tan[e + f*x]^2)/(2*f) + ((a - b)^2*Tan[e + f*x]^4)/(4*f) + ((2
*a - b)*b*Tan[e + f*x]^6)/(6*f) + (b^2*Tan[e + f*x]^8)/(8*f)

Rule 90

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandI
ntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, p}, x] && IntegersQ[m, n] &&
(IntegerQ[p] || (GtQ[m, 0] && GeQ[n, -1]))

Rule 457

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Dist[1/n, Subst[Int
[x^(Simplify[(m + 1)/n] - 1)*(a + b*x)^p*(c + d*x)^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p, q}, x] &&
 NeQ[b*c - a*d, 0] && IntegerQ[Simplify[(m + 1)/n]]

Rule 3751

Int[((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol]
 :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dist[c*(ff/f), Subst[Int[(d*ff*(x/c))^m*((a + b*(ff*x)^n)^p/(c^2
 + ff^2*x^2)), x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && (IGtQ[p, 0] || EqQ
[n, 2] || EqQ[n, 4] || (IntegerQ[p] && RationalQ[n]))

Rubi steps

\begin {align*} \int \tan ^5(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx &=\frac {\text {Subst}\left (\int \frac {x^5 \left (a+b x^2\right )^2}{1+x^2} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {\text {Subst}\left (\int \frac {x^2 (a+b x)^2}{1+x} \, dx,x,\tan ^2(e+f x)\right )}{2 f}\\ &=\frac {\text {Subst}\left (\int \left (-(a-b)^2+(a-b)^2 x+(2 a-b) b x^2+b^2 x^3+\frac {(a-b)^2}{1+x}\right ) \, dx,x,\tan ^2(e+f x)\right )}{2 f}\\ &=-\frac {(a-b)^2 \log (\cos (e+f x))}{f}-\frac {(a-b)^2 \tan ^2(e+f x)}{2 f}+\frac {(a-b)^2 \tan ^4(e+f x)}{4 f}+\frac {(2 a-b) b \tan ^6(e+f x)}{6 f}+\frac {b^2 \tan ^8(e+f x)}{8 f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.24, size = 89, normalized size = 0.85 \begin {gather*} \frac {-24 (a-b)^2 \log (\cos (e+f x))-12 (a-b)^2 \tan ^2(e+f x)+6 (a-b)^2 \tan ^4(e+f x)+4 (2 a-b) b \tan ^6(e+f x)+3 b^2 \tan ^8(e+f x)}{24 f} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Tan[e + f*x]^5*(a + b*Tan[e + f*x]^2)^2,x]

[Out]

(-24*(a - b)^2*Log[Cos[e + f*x]] - 12*(a - b)^2*Tan[e + f*x]^2 + 6*(a - b)^2*Tan[e + f*x]^4 + 4*(2*a - b)*b*Ta
n[e + f*x]^6 + 3*b^2*Tan[e + f*x]^8)/(24*f)

________________________________________________________________________________________

Maple [A]
time = 0.10, size = 143, normalized size = 1.36

method result size
norman \(\frac {b^{2} \left (\tan ^{8}\left (f x +e \right )\right )}{8 f}-\frac {\left (a^{2}-2 a b +b^{2}\right ) \left (\tan ^{2}\left (f x +e \right )\right )}{2 f}+\frac {\left (a^{2}-2 a b +b^{2}\right ) \left (\tan ^{4}\left (f x +e \right )\right )}{4 f}+\frac {\left (2 a -b \right ) b \left (\tan ^{6}\left (f x +e \right )\right )}{6 f}+\frac {\left (a^{2}-2 a b +b^{2}\right ) \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{2 f}\) \(114\)
derivativedivides \(\frac {\frac {b^{2} \left (\tan ^{8}\left (f x +e \right )\right )}{8}+\frac {a b \left (\tan ^{6}\left (f x +e \right )\right )}{3}-\frac {b^{2} \left (\tan ^{6}\left (f x +e \right )\right )}{6}+\frac {a^{2} \left (\tan ^{4}\left (f x +e \right )\right )}{4}-\frac {a b \left (\tan ^{4}\left (f x +e \right )\right )}{2}+\frac {b^{2} \left (\tan ^{4}\left (f x +e \right )\right )}{4}-\frac {a^{2} \left (\tan ^{2}\left (f x +e \right )\right )}{2}+a b \left (\tan ^{2}\left (f x +e \right )\right )-\frac {b^{2} \left (\tan ^{2}\left (f x +e \right )\right )}{2}+\frac {\left (a^{2}-2 a b +b^{2}\right ) \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{2}}{f}\) \(143\)
default \(\frac {\frac {b^{2} \left (\tan ^{8}\left (f x +e \right )\right )}{8}+\frac {a b \left (\tan ^{6}\left (f x +e \right )\right )}{3}-\frac {b^{2} \left (\tan ^{6}\left (f x +e \right )\right )}{6}+\frac {a^{2} \left (\tan ^{4}\left (f x +e \right )\right )}{4}-\frac {a b \left (\tan ^{4}\left (f x +e \right )\right )}{2}+\frac {b^{2} \left (\tan ^{4}\left (f x +e \right )\right )}{4}-\frac {a^{2} \left (\tan ^{2}\left (f x +e \right )\right )}{2}+a b \left (\tan ^{2}\left (f x +e \right )\right )-\frac {b^{2} \left (\tan ^{2}\left (f x +e \right )\right )}{2}+\frac {\left (a^{2}-2 a b +b^{2}\right ) \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{2}}{f}\) \(143\)
risch \(i a^{2} x -2 i a b x +i b^{2} x +\frac {2 i a^{2} e}{f}-\frac {4 i a b e}{f}+\frac {2 i b^{2} e}{f}-\frac {4 \left (3 a^{2} {\mathrm e}^{14 i \left (f x +e \right )}-9 a b \,{\mathrm e}^{14 i \left (f x +e \right )}+6 b^{2} {\mathrm e}^{14 i \left (f x +e \right )}+15 a^{2} {\mathrm e}^{12 i \left (f x +e \right )}-36 a b \,{\mathrm e}^{12 i \left (f x +e \right )}+18 b^{2} {\mathrm e}^{12 i \left (f x +e \right )}+33 a^{2} {\mathrm e}^{10 i \left (f x +e \right )}-79 a b \,{\mathrm e}^{10 i \left (f x +e \right )}+50 b^{2} {\mathrm e}^{10 i \left (f x +e \right )}+42 a^{2} {\mathrm e}^{8 i \left (f x +e \right )}-104 a b \,{\mathrm e}^{8 i \left (f x +e \right )}+52 b^{2} {\mathrm e}^{8 i \left (f x +e \right )}+33 a^{2} {\mathrm e}^{6 i \left (f x +e \right )}-79 a b \,{\mathrm e}^{6 i \left (f x +e \right )}+50 b^{2} {\mathrm e}^{6 i \left (f x +e \right )}+15 a^{2} {\mathrm e}^{4 i \left (f x +e \right )}-36 a b \,{\mathrm e}^{4 i \left (f x +e \right )}+18 b^{2} {\mathrm e}^{4 i \left (f x +e \right )}+3 a^{2} {\mathrm e}^{2 i \left (f x +e \right )}-9 a b \,{\mathrm e}^{2 i \left (f x +e \right )}+6 b^{2} {\mathrm e}^{2 i \left (f x +e \right )}\right )}{3 f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{8}}-\frac {\ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right ) a^{2}}{f}+\frac {2 \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right ) a b}{f}-\frac {\ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right ) b^{2}}{f}\) \(416\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(f*x+e)^5*(a+b*tan(f*x+e)^2)^2,x,method=_RETURNVERBOSE)

[Out]

1/f*(1/8*b^2*tan(f*x+e)^8+1/3*a*b*tan(f*x+e)^6-1/6*b^2*tan(f*x+e)^6+1/4*a^2*tan(f*x+e)^4-1/2*a*b*tan(f*x+e)^4+
1/4*b^2*tan(f*x+e)^4-1/2*a^2*tan(f*x+e)^2+a*b*tan(f*x+e)^2-1/2*b^2*tan(f*x+e)^2+1/2*(a^2-2*a*b+b^2)*ln(1+tan(f
*x+e)^2))

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 170, normalized size = 1.62 \begin {gather*} -\frac {12 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} \log \left (\sin \left (f x + e\right )^{2} - 1\right ) - \frac {24 \, {\left (a^{2} - 3 \, a b + 2 \, b^{2}\right )} \sin \left (f x + e\right )^{6} - 6 \, {\left (11 \, a^{2} - 30 \, a b + 18 \, b^{2}\right )} \sin \left (f x + e\right )^{4} + 4 \, {\left (15 \, a^{2} - 38 \, a b + 22 \, b^{2}\right )} \sin \left (f x + e\right )^{2} - 18 \, a^{2} + 44 \, a b - 25 \, b^{2}}{\sin \left (f x + e\right )^{8} - 4 \, \sin \left (f x + e\right )^{6} + 6 \, \sin \left (f x + e\right )^{4} - 4 \, \sin \left (f x + e\right )^{2} + 1}}{24 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)^5*(a+b*tan(f*x+e)^2)^2,x, algorithm="maxima")

[Out]

-1/24*(12*(a^2 - 2*a*b + b^2)*log(sin(f*x + e)^2 - 1) - (24*(a^2 - 3*a*b + 2*b^2)*sin(f*x + e)^6 - 6*(11*a^2 -
 30*a*b + 18*b^2)*sin(f*x + e)^4 + 4*(15*a^2 - 38*a*b + 22*b^2)*sin(f*x + e)^2 - 18*a^2 + 44*a*b - 25*b^2)/(si
n(f*x + e)^8 - 4*sin(f*x + e)^6 + 6*sin(f*x + e)^4 - 4*sin(f*x + e)^2 + 1))/f

________________________________________________________________________________________

Fricas [A]
time = 0.97, size = 112, normalized size = 1.07 \begin {gather*} \frac {3 \, b^{2} \tan \left (f x + e\right )^{8} + 4 \, {\left (2 \, a b - b^{2}\right )} \tan \left (f x + e\right )^{6} + 6 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} \tan \left (f x + e\right )^{4} - 12 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} \tan \left (f x + e\right )^{2} - 12 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} \log \left (\frac {1}{\tan \left (f x + e\right )^{2} + 1}\right )}{24 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)^5*(a+b*tan(f*x+e)^2)^2,x, algorithm="fricas")

[Out]

1/24*(3*b^2*tan(f*x + e)^8 + 4*(2*a*b - b^2)*tan(f*x + e)^6 + 6*(a^2 - 2*a*b + b^2)*tan(f*x + e)^4 - 12*(a^2 -
 2*a*b + b^2)*tan(f*x + e)^2 - 12*(a^2 - 2*a*b + b^2)*log(1/(tan(f*x + e)^2 + 1)))/f

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 206 vs. \(2 (82) = 164\).
time = 0.27, size = 206, normalized size = 1.96 \begin {gather*} \begin {cases} \frac {a^{2} \log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} + \frac {a^{2} \tan ^{4}{\left (e + f x \right )}}{4 f} - \frac {a^{2} \tan ^{2}{\left (e + f x \right )}}{2 f} - \frac {a b \log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{f} + \frac {a b \tan ^{6}{\left (e + f x \right )}}{3 f} - \frac {a b \tan ^{4}{\left (e + f x \right )}}{2 f} + \frac {a b \tan ^{2}{\left (e + f x \right )}}{f} + \frac {b^{2} \log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} + \frac {b^{2} \tan ^{8}{\left (e + f x \right )}}{8 f} - \frac {b^{2} \tan ^{6}{\left (e + f x \right )}}{6 f} + \frac {b^{2} \tan ^{4}{\left (e + f x \right )}}{4 f} - \frac {b^{2} \tan ^{2}{\left (e + f x \right )}}{2 f} & \text {for}\: f \neq 0 \\x \left (a + b \tan ^{2}{\left (e \right )}\right )^{2} \tan ^{5}{\left (e \right )} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)**5*(a+b*tan(f*x+e)**2)**2,x)

[Out]

Piecewise((a**2*log(tan(e + f*x)**2 + 1)/(2*f) + a**2*tan(e + f*x)**4/(4*f) - a**2*tan(e + f*x)**2/(2*f) - a*b
*log(tan(e + f*x)**2 + 1)/f + a*b*tan(e + f*x)**6/(3*f) - a*b*tan(e + f*x)**4/(2*f) + a*b*tan(e + f*x)**2/f +
b**2*log(tan(e + f*x)**2 + 1)/(2*f) + b**2*tan(e + f*x)**8/(8*f) - b**2*tan(e + f*x)**6/(6*f) + b**2*tan(e + f
*x)**4/(4*f) - b**2*tan(e + f*x)**2/(2*f), Ne(f, 0)), (x*(a + b*tan(e)**2)**2*tan(e)**5, True))

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 3813 vs. \(2 (102) = 204\).
time = 10.39, size = 3813, normalized size = 36.31 \begin {gather*} \text {Too large to display} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)^5*(a+b*tan(f*x+e)^2)^2,x, algorithm="giac")

[Out]

-1/24*(12*a^2*log(4*(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)
*tan(e) + 1)/(tan(e)^2 + 1))*tan(f*x)^8*tan(e)^8 - 24*a*b*log(4*(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + t
an(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(e)^2 + 1))*tan(f*x)^8*tan(e)^8 + 12*b^2*log(4*(t
an(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(e)^2
 + 1))*tan(f*x)^8*tan(e)^8 + 18*a^2*tan(f*x)^8*tan(e)^8 - 44*a*b*tan(f*x)^8*tan(e)^8 + 25*b^2*tan(f*x)^8*tan(e
)^8 - 96*a^2*log(4*(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*
tan(e) + 1)/(tan(e)^2 + 1))*tan(f*x)^7*tan(e)^7 + 192*a*b*log(4*(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + t
an(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(e)^2 + 1))*tan(f*x)^7*tan(e)^7 - 96*b^2*log(4*(t
an(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(e)^2
 + 1))*tan(f*x)^7*tan(e)^7 + 12*a^2*tan(f*x)^8*tan(e)^6 - 24*a*b*tan(f*x)^8*tan(e)^6 + 12*b^2*tan(f*x)^8*tan(e
)^6 - 120*a^2*tan(f*x)^7*tan(e)^7 + 304*a*b*tan(f*x)^7*tan(e)^7 - 176*b^2*tan(f*x)^7*tan(e)^7 + 12*a^2*tan(f*x
)^6*tan(e)^8 - 24*a*b*tan(f*x)^6*tan(e)^8 + 12*b^2*tan(f*x)^6*tan(e)^8 + 336*a^2*log(4*(tan(f*x)^4*tan(e)^2 -
2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(e)^2 + 1))*tan(f*x)^6*tan
(e)^6 - 672*a*b*log(4*(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*
x)*tan(e) + 1)/(tan(e)^2 + 1))*tan(f*x)^6*tan(e)^6 + 336*b^2*log(4*(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e)
+ tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(e)^2 + 1))*tan(f*x)^6*tan(e)^6 - 6*a^2*tan(f*
x)^8*tan(e)^4 + 12*a*b*tan(f*x)^8*tan(e)^4 - 6*b^2*tan(f*x)^8*tan(e)^4 - 96*a^2*tan(f*x)^7*tan(e)^5 + 192*a*b*
tan(f*x)^7*tan(e)^5 - 96*b^2*tan(f*x)^7*tan(e)^5 + 324*a^2*tan(f*x)^6*tan(e)^6 - 872*a*b*tan(f*x)^6*tan(e)^6 +
 520*b^2*tan(f*x)^6*tan(e)^6 - 96*a^2*tan(f*x)^5*tan(e)^7 + 192*a*b*tan(f*x)^5*tan(e)^7 - 96*b^2*tan(f*x)^5*ta
n(e)^7 - 6*a^2*tan(f*x)^4*tan(e)^8 + 12*a*b*tan(f*x)^4*tan(e)^8 - 6*b^2*tan(f*x)^4*tan(e)^8 - 672*a^2*log(4*(t
an(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(e)^2
 + 1))*tan(f*x)^5*tan(e)^5 + 1344*a*b*log(4*(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 +
 tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(e)^2 + 1))*tan(f*x)^5*tan(e)^5 - 672*b^2*log(4*(tan(f*x)^4*tan(e)^2
- 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(e)^2 + 1))*tan(f*x)^5*t
an(e)^5 - 8*a*b*tan(f*x)^8*tan(e)^2 + 4*b^2*tan(f*x)^8*tan(e)^2 + 24*a^2*tan(f*x)^7*tan(e)^3 - 96*a*b*tan(f*x)
^7*tan(e)^3 + 48*b^2*tan(f*x)^7*tan(e)^3 + 276*a^2*tan(f*x)^6*tan(e)^4 - 672*a*b*tan(f*x)^6*tan(e)^4 + 336*b^2
*tan(f*x)^6*tan(e)^4 - 504*a^2*tan(f*x)^5*tan(e)^5 + 1296*a*b*tan(f*x)^5*tan(e)^5 - 816*b^2*tan(f*x)^5*tan(e)^
5 + 276*a^2*tan(f*x)^4*tan(e)^6 - 672*a*b*tan(f*x)^4*tan(e)^6 + 336*b^2*tan(f*x)^4*tan(e)^6 + 24*a^2*tan(f*x)^
3*tan(e)^7 - 96*a*b*tan(f*x)^3*tan(e)^7 + 48*b^2*tan(f*x)^3*tan(e)^7 - 8*a*b*tan(f*x)^2*tan(e)^8 + 4*b^2*tan(f
*x)^2*tan(e)^8 + 840*a^2*log(4*(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 -
 2*tan(f*x)*tan(e) + 1)/(tan(e)^2 + 1))*tan(f*x)^4*tan(e)^4 - 1680*a*b*log(4*(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)
^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(e)^2 + 1))*tan(f*x)^4*tan(e)^4 + 84
0*b^2*log(4*(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e)
+ 1)/(tan(e)^2 + 1))*tan(f*x)^4*tan(e)^4 - 3*b^2*tan(f*x)^8 + 16*a*b*tan(f*x)^7*tan(e) - 32*b^2*tan(f*x)^7*tan
(e) - 36*a^2*tan(f*x)^6*tan(e)^2 + 168*a*b*tan(f*x)^6*tan(e)^2 - 168*b^2*tan(f*x)^6*tan(e)^2 - 384*a^2*tan(f*x
)^5*tan(e)^3 + 1008*a*b*tan(f*x)^5*tan(e)^3 - 672*b^2*tan(f*x)^5*tan(e)^3 + 564*a^2*tan(f*x)^4*tan(e)^4 - 1368
*a*b*tan(f*x)^4*tan(e)^4 + 684*b^2*tan(f*x)^4*tan(e)^4 - 384*a^2*tan(f*x)^3*tan(e)^5 + 1008*a*b*tan(f*x)^3*tan
(e)^5 - 672*b^2*tan(f*x)^3*tan(e)^5 - 36*a^2*tan(f*x)^2*tan(e)^6 + 168*a*b*tan(f*x)^2*tan(e)^6 - 168*b^2*tan(f
*x)^2*tan(e)^6 + 16*a*b*tan(f*x)*tan(e)^7 - 32*b^2*tan(f*x)*tan(e)^7 - 3*b^2*tan(e)^8 - 672*a^2*log(4*(tan(f*x
)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(e)^2 + 1))
*tan(f*x)^3*tan(e)^3 + 1344*a*b*log(4*(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f
*x)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(e)^2 + 1))*tan(f*x)^3*tan(e)^3 - 672*b^2*log(4*(tan(f*x)^4*tan(e)^2 - 2*ta
n(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(e)^2 + 1))*tan(f*x)^3*tan(e)^
3 - 8*a*b*tan(f*x)^6 + 4*b^2*tan(f*x)^6 + 24*a^2*tan(f*x)^5*tan(e) - 96*a*b*tan(f*x)^5*tan(e) + 48*b^2*tan(f*x
)^5*tan(e) + 276*a^2*tan(f*x)^4*tan(e)^2 - 672*a*b*tan(f*x)^4*tan(e)^2 + 336*b^2*tan(f*x)^4*tan(e)^2 - 504*a^2
*tan(f*x)^3*tan(e)^3 + 1296*a*b*tan(f*x)^3*tan(...

________________________________________________________________________________________

Mupad [B]
time = 11.59, size = 113, normalized size = 1.08 \begin {gather*} \frac {\ln \left ({\mathrm {tan}\left (e+f\,x\right )}^2+1\right )\,\left (\frac {a^2}{2}-a\,b+\frac {b^2}{2}\right )+{\mathrm {tan}\left (e+f\,x\right )}^6\,\left (\frac {a\,b}{3}-\frac {b^2}{6}\right )+\frac {b^2\,{\mathrm {tan}\left (e+f\,x\right )}^8}{8}-{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (\frac {a^2}{2}-a\,b+\frac {b^2}{2}\right )+{\mathrm {tan}\left (e+f\,x\right )}^4\,\left (\frac {a^2}{4}-\frac {a\,b}{2}+\frac {b^2}{4}\right )}{f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(e + f*x)^5*(a + b*tan(e + f*x)^2)^2,x)

[Out]

(log(tan(e + f*x)^2 + 1)*(a^2/2 - a*b + b^2/2) + tan(e + f*x)^6*((a*b)/3 - b^2/6) + (b^2*tan(e + f*x)^8)/8 - t
an(e + f*x)^2*(a^2/2 - a*b + b^2/2) + tan(e + f*x)^4*(a^2/4 - (a*b)/2 + b^2/4))/f

________________________________________________________________________________________